package com.xinweisi.dataserver.module.memberdata.onlinemember;

import com.xinweisi.dataserver.common.domain.PageResultDTO;
import com.xinweisi.dataserver.common.domain.ResponseDTO;
import com.xinweisi.dataserver.module.memberdata.onlinemember.domain.dto.OnLineMemberQueryDTO;
import com.xinweisi.dataserver.module.memberdata.onlinemember.domain.vo.OnLineMemberVO;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.text.ParseException;

@Slf4j
@RestController
@RequestMapping("/api/onlineMember")
public class OnlineMemberController {
    @Autowired
    OnlineMemberService onlineMemberservice;

    @ApiOperation(value = "分页查询所有在线会员", notes = "分页查询所有在线会员")
    @RequestMapping(value = "/getOnlineMember",method= RequestMethod.POST)
    public ResponseDTO<PageResultDTO<OnLineMemberVO>> getOnlineMember(@RequestBody @Valid OnLineMemberQueryDTO queryDTO) throws ParseException {
        log.info("----------进入查询所有在线会员----------");
        return onlineMemberservice.getOnlineMember(queryDTO);
    }

}
